Add PLOT balance with USD value to profile wallet card#696
Conversation
- Fetch PLOT balance via erc20Abi.balanceOf using browserClient - Display formatted balance with locale separators (e.g. "111,841.40 PLOT") - Show USD equivalent using usePlotUsdPrice hook (e.g. "≈ $1,901.30") - Works for any profile (public on-chain data) Fixes #693 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
APPROVE — Changes correctly address all acceptance criteria:
- PLOT balance fetched on-chain via
erc20Abi.balanceOfwith react-query ✅ - Formatted display with locale separators + 2 decimal places ✅
- USD value via existing
usePlotUsdPrice()hook ✅ - Styling matches existing trust dashboard cards (text-muted, text-[11px]) ✅
- Works for any profile (public on-chain data) ✅
Minor note (non-blocking): formatUnits(plotBalance, 18) hardcodes decimals — consistent with existing claimedRoyalties usage in this file, but ideally should fetch dynamically via erc20Abi.decimals. Fine for a follow-up.
LGTM.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
This PR implements #693 as requested: it reads the public PLOT balance on-chain, shows the formatted token balance, and adds the USD equivalent in the wallet card for any profile page.
Findings
- None. Residual risk is limited to UI display behavior because there is no targeted test coverage for the new wallet-card line.
Decision
Approved because the change is scoped to src/app/profile/[address]/page.tsx and follows the existing USD-price/display patterns already used elsewhere in the profile and stats views.
Summary
erc20Abi.balanceOfusingbrowserClientusePlotUsdPricehook (e.g. "≈ $1,901.30")Files changed
src/app/profile/[address]/page.tsx— addedplotBalancequery + display in wallet cardSelf-verification
npm run buildpassesFixes #693
🤖 Generated with Claude Code